Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

TL;DR
Fixed a bug in the
InsertBlockDatafunction where negative block signs were not being properly handled.What changed?
Modified the condition in
InsertBlockDatathat determines when to use the block's sign value. Previously, the code would only use the block's sign if it wasn't equal to 1, but now it specifically checks if the sign is -1. This ensures that only explicitly negative signs are treated differently.How to test?
Why make this change?
The previous implementation had a logic error where any sign value that wasn't 1 (including 0) would be used as-is. This could lead to incorrect sign values being stored in the database. The fix ensures that only explicitly negative signs (-1) are preserved, while all other values default to positive (1).